<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
    <style>
        h1 {
            background-color: #bc342a;

        }

        /* .v-enter,.v-leave-to{
            transform: translateX(-100%);
        }
        .v-enter-active,.v-leave-active{
            transition: 0.5s linear;
        }
        .v-enter-to,.v-leave{
            transform: translateX(0);

        } */

        /* .v-enter-active{
            animation: identifier  0.5s linear;
        }
        .v-leave-active{
            
            animation: identifier  0.5s linear reverse;
        }

        @keyframes identifier {
            from {
                transform: translateX(-100%);
            }

            to {
                transform: translateX(0);
            }
        } */
    </style>
</head>

<body>
    <div class="box">
        <button @click="boo=!boo">显示/隐藏</button>
        <transition appear 
            enter-active-class="animate__bounceIn"
            leave-active-class="animate__bounceOut">
            <h1 v-show="boo">你好啊</h1>
        </transition>
    </div>

    <script src="./src/assets/vue.min.js"></script>
    <script>
        // import 'animate.css';
        new Vue({
            el: ".box",
            data: {
                boo: true
            }
        })
    </script>
</body>

</html>